package com.party.core.model.wechat;

import com.party.core.model.BaseModel;

/**
 * 微信商户
 * Created by wei.li.
 *
 * @date 2017/12/7 0007
 * @time 17:43
 */
public class WechatMerchants extends BaseModel {
    private static final long serialVersionUID = -5632090785961605220L;

    //商户名称
    private String merchantName;

    //商户编号
    private String merchantId;

    //商户秘钥
    private String merchantApiKey;

    //证书地址
    private String certUrl;

    //类型
    private String type;


    public String getMerchantName() {
        return merchantName;
    }

    public void setMerchantName(String merchantName) {
        this.merchantName = merchantName;
    }

    public String getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(String merchantId) {
        this.merchantId = merchantId;
    }

    public String getMerchantApiKey() {
        return merchantApiKey;
    }

    public void setMerchantApiKey(String merchantApiKey) {
        this.merchantApiKey = merchantApiKey;
    }

    public String getCertUrl() {
        return certUrl;
    }

    public void setCertUrl(String certUrl) {
        this.certUrl = certUrl;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;

        WechatMerchants that = (WechatMerchants) o;

        if (merchantName != null ? !merchantName.equals(that.merchantName) : that.merchantName != null) return false;
        if (merchantId != null ? !merchantId.equals(that.merchantId) : that.merchantId != null) return false;
        if (merchantApiKey != null ? !merchantApiKey.equals(that.merchantApiKey) : that.merchantApiKey != null)
            return false;
        if (certUrl != null ? !certUrl.equals(that.certUrl) : that.certUrl != null) return false;
        return type != null ? type.equals(that.type) : that.type == null;

    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (merchantName != null ? merchantName.hashCode() : 0);
        result = 31 * result + (merchantId != null ? merchantId.hashCode() : 0);
        result = 31 * result + (merchantApiKey != null ? merchantApiKey.hashCode() : 0);
        result = 31 * result + (certUrl != null ? certUrl.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "WechatMerchants{" +
                "merchantName='" + merchantName + '\'' +
                ", merchantId='" + merchantId + '\'' +
                ", merchantApiKey='" + merchantApiKey + '\'' +
                ", certUrl='" + certUrl + '\'' +
                ", type='" + type + '\'' +
                '}';
    }
}
